Only used for tests